Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #7029 ALR hashes are added to source when DONOTROCKETOPTIMIZE is set to true #7238

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

Khadreal
Copy link
Contributor

Description

Don't add ALR to source if constant is set to true.

Fixes #7029
Explain how this code impacts users.

Type of change

  • Bug fix (non-breaking change which fixes an issue).

Detailed scenario

Check #7029

Technical description

Documentation

Add a check for the DONOTROCKETOPTIMIZE constants before adding hashes to page.

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.
  • I implemented built-in tests to cover the new/changed code.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.
  • Output messages (errors, notices, logs) are explicit enough for users to understand the issue and are actionnable.

Copy link

codacy-production bot commented Jan 23, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 93fef5c1 100.00% (target: 50.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (93fef5c) Report Missing Report Missing Report Missing
Head commit (f856eed) 39355 17153 43.59%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#7238) 3 3 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@hanna-meda hanna-meda assigned hanna-meda and unassigned hanna-meda Jan 27, 2025
@jeawhanlee
Copy link
Contributor

Thanks for the PR @Khadreal I can see that when visiting pages with DONOTROCKETOPTIMIZE set to true, beacon is not injected and url is not added to db for both LRC/ATF but however, warmup still happens.

I believe this can be fixed by adding the check to the conditional in this method

@Khadreal
Copy link
Contributor Author

Thanks for the PR @Khadreal I can see that when visiting pages with DONOTROCKETOPTIMIZE set to true, beacon is not injected and url is not added to db for both LRC/ATF but however, warmup still happens.

I believe this can be fixed by adding the check to the conditional in this method

Made the requested modifications @jeawhanlee, please confirm

@Khadreal Khadreal requested a review from jeawhanlee January 28, 2025 15:38
@jeawhanlee
Copy link
Contributor

@Miraeld
Copy link
Contributor

Miraeld commented Jan 29, 2025

testrail-report-690.pdf

@wp-media/qa-team @Khadreal There is a regression compare to 3.18,
When visiting a page with the query string ?wpr_lazyrendercontent hashes should be added to the html, however with this PR we don't get this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ALR hashes are added to source when DONOTROCKETOPTIMIZE is set to true
4 participants